home *** CD-ROM | disk | FTP | other *** search
/ Point Programming 1 / PPROG1.ISO / pascal / swag / parsing.swg / 0004_Check for CmdLine switch.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-09-26  |  713 b   |  15 lines

  1. {*****************************************************************************
  2.  * Function ...... IsSwitch()
  3.  * Purpose ....... To test for the presence of a switch on the command line
  4.  * Parameters .... sSwitch     Switch to scan the command line for
  5.  * Returns ....... .T. if the switch was found
  6.  * Notes ......... Uses functions Command and UpperCase
  7.  * Author ........ Martin Richardson
  8.  * Date .......... September 28, 1992
  9.  *****************************************************************************}
  10. FUNCTION IsSwitch( sSwitch: STRING ): BOOLEAN;
  11. BEGIN
  12.      IsSwitch := (POS( '/'+sSwitch, UpperCase(Command) ) <> 0) OR
  13.                  (POS( '-'+sSwitch, UpperCase(Command) ) <> 0);
  14. END;
  15.